<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    

</body>
<script>
    //一下类都继承自HTMLELEMENT
    HTMLLIElement
    HTMLDivElement
    HTMLInputElement
    // <!-- 继承的概念 -->
    class Person {
        running() {
            console.log('running')
        }
    }
    var p1 = new Person();
    class Student extends Person {
        studying() {
            console.log('love studying')
        }
    }
    var s1 = new Student();
    s1.running()
    s1.studying()

    // 1.增加了代码的可复用性
    // 2.继承是多态的前提



</script>

</html>